package com.chixing.day07.ToStringDemo;

public class Company {
    //属性
    //成员变量(字段)
    private int companyId;
    private String companyName;
    private String companyType;
    private String companyAddress;
    private long companyTelephon;


    //构造函数

    public Company(int companyId, String companyName, String companyType, String companyAddress, long companyTelephon) {
        this.companyId = companyId;
        this.companyName = companyName;
        this.companyType = companyType;
        this.companyAddress = companyAddress;
        this.companyTelephon = companyTelephon;
    }

    //get set

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyType() {
        return companyType;
    }

    public void setCompanyType(String companyType) {
        this.companyType = companyType;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public long getCompanyTelephon() {
        return companyTelephon;
    }

    public void setCompanyTelephon(long companyTelephon) {
        this.companyTelephon = companyTelephon;
    }


    //其他普通方法

    //toString
    //重写Object.toString()


    @Override
    public String toString() {
        return "Company{" +
                "companyId=" + companyId +
                ", companyName='" + companyName + '\'' +
                ", companyType='" + companyType + '\'' +
                ", companyAddress='" + companyAddress + '\'' +
                ", companyTelephon=" + companyTelephon +
                '}';
    }
}
